<?php

namespace co2_OS;

class app
/*	app{}	*/
{
	protected
		$name,
		$base,
		$manifested
		;
	
	public function
	__construct
	(
		$app
	)
	{
		$this->name=$app;
		$this->manifested=isset(main::getAppsManifest()->$app);
		$this->base=main::getSysVar('apps').'/'.$app;
	}

	public function
	__toString
	()
	{
		return $this->name;
	}

	public function
	exists
	()

	{
		return $this->manifested && is_dir($this->base);
	}

	public function
	getBase
	()

	{
		return $this->base;
	}

	public function
	isManifested
	()
	{
		return $this->manifested;
	}
}
